import request from "@/config/axios";
// 请求树形控件数据
export const queryTreeList = (data) =>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/sysDepart/queryTreeList`,
        method:'GET'
    }
)
// 修改树形控件数据
export const queryTreeListedit = (data) =>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/sysDepart/edit`,
        method:'PUT',
        data
    }
)
// 添加树形控件数据
export const queryTreeListadd = (data) =>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/sysDepart/add`,
        method:'POST',
        data
    }
)
// 获取权限列表
export const queryTreeListRole = (data) =>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/role/queryTreeList`,
        method:'GET',
    }
)
// 获取选中权限状态
export const queryDepartPermission = (data) =>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/permission/queryDepartPermission?departId=${data.departId}`,
        method:'GET',
        data
    }
)
// 删除节点
export const queryDepartDelete = (data) =>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/sysDepart/delete?id=${data}`,
        method:'DELETE',
        data
    }
)
// 批量删除节点
export const queryDepartQueryDelete = (data) =>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/sysDepart/deleteBatch?ids=${data}`,
        method:'DELETE',
        data
    }
)
// 保存权限
export const querysaveDepartPermission = (data) =>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/permission/saveDepartPermission`,
        method:'POST',
        data
    }
) 
// 获取抽屉配置
export const querysysDepartPermission = (data) =>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/sysDepartPermission/datarule/${data.key}/${data.parentId}`,
        method:'GET',
        data
    }
) 
// 修改配置权限
export const querysaveDepartPermissiondatarule = (data) =>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/sysDepartPermission/datarule`,
        method:'POST',
        data
    }
) 
// 导出
export const exportXls = (data) =>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/sysDepart/exportXls?_t=1665996589&column=createTime&order=desc&field=id,,departName,orgType,orgCode,mobile,fax,address,departOrder,action&pageNo=1&pageSize=10`,
        method:'GET',
        data,
        responseType:'blob',
    }
) 